#!/usr/bin/env perl
require 5.005;
use strict;
use warnings;

$|=1;
my ($name,$type,$var,$line);
do {
    print STDERR "method type varname: ";
    chomp($line=<STDIN>);
    last if $line eq '';

    ($name,$type,$var) = split(/\s+/,$line);
    print << "EOF";
  /**
   * Accessor
   *
   * \@see #set$name($type)
   */
  public $type get$name()
  { return this.m_$var; }

  /**
   * Accessor.
   *
   * \@param $var
   * \@see #get$name()
   */
  public void set$name( $type $var )
  { this.m_$var = $var; }

EOF
} while ( 1 );
